layui.define(['jquery','element','scrollReveal','viewer','slick'], function (exports) {
	var moduleName = 'floorContent';
	var $ = layui.jquery;
	layui.link('./js/plugins/slick.css');
	layui.link('./js/plugins/slick-theme.css');
	layui.link('./js/plugins/viewer.min.css')
	var element = layui.element;
	var scrollReveal = layui.scrollReveal;
	var Viewer = layui.viewer;
	var animate = new scrollReveal({ reset: false, move: '100px'});
	var $doc = $(document);
	$doc.on('focus','.search-input',function(){
		var val = $(this).val();
		if(!val) $('.search-tips').hide();
	}).on('blur','.search-input',function(){
		var val = $(this).val();
		if(!val) $('.search-tips').show();
	})
	
	$(".slider-for").slick({
		slidesToShow: 1,
	  slidesToScroll: 1,
	  arrows: false,
	  fade: false,
	  asNavFor: '.slider-nav'
	})
	$('.slider-nav').slick({
	  slidesToShow: 3,
	  slidesToScroll: 1,
	  asNavFor: '.slider-for',
	  dots: false,
	  centerMode: false,
	  focusOnSelect: true,
	  arrows: true,
	  prevArrow:'<div class="arrow arrow-left"><i class="layui-icon layui-icon-left" ></i></div>',
	  nextArrow:'<div class="arrow arrow-right"><i class="layui-icon layui-icon-right" ></i></div>'
	});
	
	
	
	var viewer1 = new Viewer(document.getElementById('image'), {
		url: 'data-src',
		navbar:false,
		toolbar:false,
	});
	var viewer2 = new Viewer(document.getElementById('house-type'), {
		url: 'data-src',
		navbar:false,
		toolbar:false
	});
	// 返回顶部
	$doc.on('click','.back-top',function(){
		$('html').animate({
			scrollTop:0
		},300)
	})
	
	
	exports(moduleName)
})